
import AxiosUtils from '@/utils/request.js';

let prefix = '/firewall/';

export default {
  prefix,
  info(hostId){
    return AxiosUtils({
      url: prefix+hostId,
      method: 'get'
    });
  },
  updateState(hostId, state){
    return AxiosUtils({
      url: prefix + hostId +'/state?state='+state,
      method: 'get'
    });
  },
  getServiceList(hostId){
    return AxiosUtils({
      url: prefix + hostId+ '/services',
      method: 'get'
    });
  },
  updateRule(hostId, data){
    return AxiosUtils({
      url: prefix + hostId,
      data
    });
  }
};